<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var arr1 =[1,2,3,4,5];
    console.log(arr1);

    arr1.pop();
    console.log(arr1);

    arr1.push(8);
    console.log(arr1);

    arr1.splice(0,1,'a','b')//从索引0开始删除1个元素,然后再添加两个元素
    console.log(arr1);

    var s1 =arr1.join('-');
    console.log(s1);

    var s2 = arr1+'';
    console.log(s2);

    var arr2 = [6,6,6];
    console.log(arr2);

    arr1.concat(arr2);
    console.log(arr1,arr2)

    arr1=arr1.concat(arr2);
    console.log(arr1);
</script>
</body>
</html>